import http from "../untils/http"
import type { IadminList } from "../untils/type"

// 管理员列表
export const getAdminListAPI = (data: IadminList) => {
  return http({
    url: '/users/getUserList',
    method: 'get',
    data,
  })
}

// 增加管理员
export const addAdminAPI = (data: IadminList) => {
  return http({
    url: '/users/addUser',
    method: 'post',
    data
  })
}

//修改管理员
export const updateAdminAPI = (data: IadminList) => {
  return http({
    url: '/users/updateUser',
    method: 'post',
    data
  })
}

//删除（禁用）管理员
export const delAdminAPI = (data: any) => {
  return http({
    url: '/users/deleteUser',
    method: 'get',
    data,
  })
}

// 密码修改
export const resetPwdAPI = (data: any) => {
  return http({
    url: '/users/changePwd',
    method: 'post',
    data,
  })
}

